import request from '../../src/unitls/request.js'

const register = (data) => {
	return request.post({
		url: '/mock/register',
		data,
		auth: false
	})
}

const updateUserInfo = (data) => {
	return request.post({
		url: '/mock/updateUserInfo',
		data,
		auth: true
	})
}

const updateUserName = (data) => {
	return request.post({
		url: '/mock/updateUserName',
		data,
		auth: true
	})
}
const updateUserPhone = (data) => {
	return request.post({
		url: '/mock/updateUserPhone',
		data,
		auth: true
	})
}
const updateUserEmail = (data) => {
	return request.post({
		url: '/mock/updateUserEmail',
		data,
		auth: true
	})
}

const updatePassWord = (data) => {
	return request.post({
		url: '/mock/updatePassWord',
		data,
		auth: true
	})
}

const goodsCollect = (data) => {
	return request.post({
		url: '/mock/goodsCollect',
		data,
		auth: true
	})
}

const getAddressList = (data) => {
	return request.post({
		url: '/mock/getAddressList',
		data,
		auth: true
	})
}

const getAddressDetail = (data) => {
	return request.post({
		url: '/mock/getAddressDetail',
		data,
		auth: true
	})
}
const updateAddress = (data) => {
	return request.post({
		url: '/mock/updateAddress',
		data,
		auth: true
	})
}
const findProvince = (data) => {
	return request.post({
		url: '/mock/findProvince',
		data,
		auth: true
	})
}
const findCity = (data) => {
	return request.post({
		url: '/mock/findCity',
		data,
		auth: true
	})
}
const findCounty = (data) => {
	return request.post({
		url: '/mock/findCounty',
		data,
		auth: true
	})
}
const addAddress = (data) => {
	return request.post({
		url: '/mock/addAddress',
		data,
		auth: true
	})
}
const delAddress = (data) => {
	return request.post({
		url: '/mock/delAddress',
		data,
		auth: true
	})
}
export default {
	register,
	updateUserInfo,
	updateUserName,
	updateUserPhone,
	updateUserEmail,
	updatePassWord,
	goodsCollect,
	getAddressList,
	getAddressDetail,
	updateAddress,
	findProvince,
	findCity,
	findCounty,
	addAddress,
	delAddress
}